package com.cq.hd.member.mapper;

import com.cq.hd.member.api.dto.MerchantAmtAddDto;
import com.cq.hd.member.api.dto.MerchantPageDto;
import com.cq.hd.member.api.vo.MerchantDetailVo;
import com.cq.hd.member.api.vo.MerchantPageVo;
import com.cq.hd.member.po.TbMerchantPo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 商户表 Mapper 接口
 * </p>
 *
 * @author mYunYu
 * @since 2023-11-21
 */
@Mapper
public interface TbMerchantMapper extends BaseMapper<TbMerchantPo> {

    List<MerchantPageVo> listMerchantByDto(MerchantPageDto merchantPageDto);

    List<MerchantPageVo> listMerchantByIds(@Param("ids") List<String> ids);

    List<MerchantDetailVo> listDetailByIds(@Param("ids") List<Long> ids);

    Boolean merchantAmtAddDto(MerchantAmtAddDto merchantAmtAddDto);

    int subMerchantSubsidyAmt(@Param("id") Long id, @Param("tradeAmt") BigDecimal tradeAmt);

    int subMerchantAmt(@Param("id") Long id, @Param("tradeAmt") BigDecimal tradeAmt);

}
